<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改报页')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-reporttab-edit" th:object="${databandReporttab}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">所属报表：</label>
                <div class="col-sm-8">
                  
                    <select name="reportid" id="reportid" th:field="*{reportid}" class="form-control">
<option th:each="item:${report}" th:value="${item.id}" th:text="${item.title}"></option>
</select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">标题：</label>
                <div class="col-sm-8">
                    <input name="title" th:field="*{title}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">SQL：</label>
                <div class="col-sm-8">
                    <textarea name="sql" class="form-control">[[*{sql}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">列表SQL：</label>
                <div class="col-sm-8">
                    <textarea name="listsql" class="form-control">[[*{listsql}]]</textarea>
                </div>
            </div>
            <div class="form-group">
				<label class="col-sm-3 control-label">数据接口地址 ：</label>
				<div class="col-sm-8">
					<textarea name="apiurl"  th:field="*{apiurl}" class="form-control"></textarea>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">接口参数：</label>
				<div class="col-sm-8">
					<textarea name="apiparam"  th:field="*{apiparam}" class="form-control"></textarea>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">接口标签：</label>
				<div class="col-sm-8">
					<textarea name="apitag"  th:field="*{apitag}" class="form-control"></textarea>
				</div>
			</div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">页签排序：</label>
                <div class="col-sm-8">
                    <input name="sortnum" th:field="*{sortnum}" class="form-control" type="number" required maxlength="10" onkeyup="value=value.replace(/[^\d]/g,'')" onblur="value=value.replace(/[^\d]/g,'')" >
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">数据源：</label>
                <div class="col-sm-8">
                   
                    <select name="sourceid" id="sourceid" th:field="*{sourceid}" class="form-control">
						<option value="">--请选择--</option>
						<option th:each="item:${datasource}" th:value="${item.id}"
							th:text="${item.title}"></option>
					</select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "web/reporttab";
        $("#form-reporttab-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-reporttab-edit').serialize());
            }
        }
    </script>
</body>
</html>